Devices for measuring the frequency of an input signal are used in many applications and are well known. Rate/ratio meters used in process control are a form of frequency counter. In one application, the rate of flow in a conduit is monitored by a flow meter, the output of which, is a series of pulses that represent the rate of flow being measured. The frequency of pulses varies with the fluid flow rate. A rate meter or indicator connected to the flow meter must determine the number of pulses per time interval in order to arrive at a flow rate that corresponds to the pulse frequency received.
In other applications, the rate meter/indicator is connected to a motor speed sensor or a web speed sensor. Again the rate meter/indicator counts pulses that are output from the sensor. The pulse rate emitted by the sensor is normally proportional to the speed.
Rate indicators/meters are commercially available that are capable of determining pulse rates for a predetermined range of frequencies. In many cases, the maximum pulse frequency that can be counted is determined by the hardware and/or software forming part of the device.
As process control becomes more sophisticated, it is desirable to provide rate meters that are capable of monitoring two frequency inputs simultaneously and to calculate rate differences, ratios and other information related to the inputs. For example, in some applications it is desirable to determine the ratio of the two frequencies being monitored (which correspond to the flow rates of two different supplies). Some applications require the calculation of a rate difference between the two flow rates being monitored while still other applications require the calculation of a "draw" which is a percentage and is determined by the difference between the two flow rates divided by one of the flow rates.
It is also desirable to have a rate/ratio meter that can communicate with a host computer via a serial interface so that commands may be sent to the meter from the host computer and so the data received by the meter can be transmitted directly to the host computer.
Many if not most of these types of devices utilize microprocessors to control their operation and to perform the desired calculating tasks and the monitoring functions. The performance of a given meter is therefore a function of the speed with which the device can perform these chores.
It has been found that many devices have substantial performance degradation when serial communications are established between the device and the host computer. If the pulse counting and rate determination are conducted as high priority tasks, serial communications will suffer and characters may be lost especially at high baud rates. If the serial communication is conducted as a high priority task, pulse counting may be inaccurate since counts will be lost while serial communication tasks are being performed.
As is known, in order to determine the frequency of a signal, one must determine the number of pulses that have occurred in a given period of time. These two quantities can then be used to calculate the frequency. In some devices, the so-called "sample period" is a fixed amount of time and the device simply counts the number of pulses that occur in the fixed interval of time to arrive at a frequency. This type of calculation may prove inaccurate especially at low frequencies since the period may begin and/or end between pulses and therefore the period is in effect longer than the actual interval of time that occurred between the first pulse and the last pulse.
To improve the accuracy of the frequency determination, at least some devices implement the "reciprocal-time method" (also termed 1/tau) to measure the exact time between the starting pulse and the end pulse. In this method, an average sample time is preset. However, the timer does not begin to increment until the first pulse has been received. The "sample interval" actually terminates on the pulse following time out of the average sample timer. As a result, the sample period used in the frequency calculation is the actual time period between the first and last pulse.
Implementing the 1/tau method of calculating frequency in software takes additional microprocessor cycles as compared to the fixed sample period method of calculating frequency. The performance of devices that implement the 1/tau method in software may experience performance degradation as the frequencies of the signals being monitored increase and will experience even further degradation if the devices are in serial communication with a host computer.